<html>
  <head>
    <meta name="layout" content="hrm"/>
    <title>Employee List</title>
  </head>
  <body>
    <div class="top-bar">
      <h1>Employee List</h1>
    </div><br/>
    <div class="select-bar">
      <label>
        <input type="text" name="textfield"/>
      </label>
      <label>
        <input type="submit" name="Submit" value="Search"/>
      </label>
    </div>
    <div class="table">
      <img src="${resource(dir:'images',file:'bg-th-left.gif')}" width="8" height="7" alt="" class="left" />
      <img src="${resource(dir:'images',file:'bg-th-right.gif')}" width="7" height="7" alt="" class="right" />
      <table class="listing" cellpadding="0" cellspacing="0">
        <tr>
          <th class="first" width="177">Name</th>
          <th>Edit</th>
          <th>Delete</th>
        </tr>
        <g:each in="${userInstanceList}" var="userInstance">
          <tr>
            <td class="first style1"><g:link id="${userInstance?.id}" controller="user" action="show">${userInstance?.name}</g:link></td>
          <td>
            <modalbox:createLink controller="user" action="edit" id ="${userInstance?.id}" title="Edit" width="500" class="button">
              <img src="${resource(dir:'images',file:'edit-icon.gif')}" width="16" height="16" alt=""/>
            </modalbox:createLink>
          </td>
          <td>
          <g:form controller="user" id="${userInstance?.id}">
            <g:actionSubmit onclick="return confirm('Are you sure?');" action="delete" value="Delete" />
          </g:form>
          </td>
          </tr>
        </g:each>
      </table>
    </div>
    <div class="paginateButtons">
      <g:paginate total="${userInstanceTotal}" />
    </div>
  </body>
</html>
